Optical communication includes non-visible light communication and visible light communication. An example of common non-visible light communication is infrared communication. Infrared communication uses an infrared ray as an information transmission medium, namely, a communication channel. A transmitting terminal modulates a baseband binary signal into a series of pulse signals, and transmits an infrared signal by using an infrared emitter. A receiving terminal converts a received light pulse signal into an electrical signal, performs processing such as amplification and filtering, and then sends the signal to a demodulation circuit for demodulation, so that a binary digital signal is restored and output. Common visible light communication is a short-range high-speed wireless light communications technology that is developed on a basis of an LED technology. A basic principle of visible light communication is that communication is performed by flashing an LED light source at a high frequency based on a characteristic that a switching speed of an LED is higher than that of a fluorescent lamp and an incandescent lamp. Presence of light represents 1, and absence of light represents 0. Information is obtained after a high-speed light signal undergoes photoelectric conversion.
In the wireless light communications technology, data is unlikely to be interfered with or captured, and an optical communication device can be easily made and is unlikely to be damaged or degaussed. Therefore, the wireless light communications technology can be used to make a wireless optical encryption key. Compared with microwave technologies, the wireless light communication has abundant spectrum resources, which is incomparable with general microwave communication and wireless communication. In addition, the visible light communication is applicable to any communications protocol, and applicable to any environment. In terms of security, in contrast to conventional magnetic materials, there is no need to worry about a problem of degaussing or even to worry about unlawful interception of communication content; and a wireless optical communication device features flexible and convenient installation and layout, and a low cost, and is applicable to large-scale popularity and application.
Considering security of a light signal, a technical solution to encryption and decryption based on a light guide signal is provided in a related art. In the technical solution, a transmitting terminal encrypts an original signal and a light guide signal by using a pseudocode signal, and obtains a scrambled code signal after encoding; and a receiving terminal decrypts the encrypted original signal by using the descrambled light guide signal. Because a varying scrambled code signal is transmitted between the transmitting terminal and the receiving terminal and is unlikely to be cracked, security of signal transmission is ensured.
In the related art, before encoding is performed, the light guide signal is a group of binary digital sequences of all “1s”; after an operation is performed with a pseudocode sequence, a scrambled code signal that varies with the pseudocode sequence is obtained. By using information of the light guide signal, the receiving terminal finds the pseudocode sequence used by the transmitting terminal for encrypting the original signal, and decrypts an encrypted data part by using the found pseudocode sequence, to finally restore real original data information such as a user identity ID. Because the unscrambled light guide signal at the transmitting terminal is a group of binary digital sequences of all “1s”, and the receiving terminal stores only a unique user identity, the foregoing technical solution is applicable to only one transmitting terminal.
Currently, no effective solution to the foregoing problem is provided yet.